package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SaleOrderDeliveryMapper;
import com.ruoyi.system.domain.SaleOrderDelivery;
import com.ruoyi.system.service.ISaleOrderDeliveryService;
import com.ruoyi.common.core.text.Convert;

/**
 * 销售订单发货记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-16
 */
@Service
public class SaleOrderDeliveryServiceImpl implements ISaleOrderDeliveryService 
{
    @Autowired
    private SaleOrderDeliveryMapper saleOrderDeliveryMapper;

    /**
     * 查询销售订单发货记录
     * 
     * @param deliveryId 销售订单发货记录主键
     * @return 销售订单发货记录
     */
    @Override
    public SaleOrderDelivery selectSaleOrderDeliveryByDeliveryId(Long deliveryId)
    {
        return saleOrderDeliveryMapper.selectSaleOrderDeliveryByDeliveryId(deliveryId);
    }

    /**
     * 查询销售订单发货记录列表
     * 
     * @param saleOrderDelivery 销售订单发货记录
     * @return 销售订单发货记录
     */
    @Override
    public List<SaleOrderDelivery> selectSaleOrderDeliveryList(SaleOrderDelivery saleOrderDelivery)
    {
        return saleOrderDeliveryMapper.selectSaleOrderDeliveryList(saleOrderDelivery);
    }

    /**
     * 新增销售订单发货记录
     * 
     * @param saleOrderDelivery 销售订单发货记录
     * @return 结果
     */
    @Override
    public int insertSaleOrderDelivery(SaleOrderDelivery saleOrderDelivery)
    {
        return saleOrderDeliveryMapper.insertSaleOrderDelivery(saleOrderDelivery);
    }

    /**
     * 修改销售订单发货记录
     * 
     * @param saleOrderDelivery 销售订单发货记录
     * @return 结果
     */
    @Override
    public int updateSaleOrderDelivery(SaleOrderDelivery saleOrderDelivery)
    {
        return saleOrderDeliveryMapper.updateSaleOrderDelivery(saleOrderDelivery);
    }

    /**
     * 批量删除销售订单发货记录
     * 
     * @param deliveryIds 需要删除的销售订单发货记录主键
     * @return 结果
     */
    @Override
    public int deleteSaleOrderDeliveryByDeliveryIds(String deliveryIds)
    {
        return saleOrderDeliveryMapper.deleteSaleOrderDeliveryByDeliveryIds(Convert.toStrArray(deliveryIds));
    }

    /**
     * 删除销售订单发货记录信息
     * 
     * @param deliveryId 销售订单发货记录主键
     * @return 结果
     */
    @Override
    public int deleteSaleOrderDeliveryByDeliveryId(Long deliveryId)
    {
        return saleOrderDeliveryMapper.deleteSaleOrderDeliveryByDeliveryId(deliveryId);
    }
}
